FROM php:8.1.10-fpm

# 安装必要的 php 依赖包
RUN apt-get update \
    && apt-get install -qq git curl libmcrypt-dev libjpeg-dev libpng-dev libfreetype6-dev libbz2-dev \
    && apt-get clean

RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" \ 
    && php composer-setup.php --install-dir=/usr/local/bin --filename=composer \ 
    && php -r "unlink('composer-setup.php');" 

# 安装 php 扩展  mcrypt zip gd
RUN docker-php-ext-install pdo pdo_mysql